const path = require('path')

function resolve(dir) {
    return path.join(__dirname, dir)
}

// 官方vue.config.js配置参考文档: https://cli.vuejs.org/zh/config/#css-loaderoptions
module.exports = {
    publicPath: process.env.NODE_ENV === "development" ? "/" : "/shop-admin-ui",
    outputDir: 'build',
    assetsDir: 'static',
    lintOnSave: false,
    productionSourceMap: false,
    devServer: { // 开发环境配置
        host: '0.0.0.0',
        port: 80, // 端口
        open: true,
        disableHostCheck: true
    },
    configureWebpack: {
        resolve: {
            alias: {
                '@': resolve('src')
            }
        }
    },
}
